﻿@using CodeCamp.Models.Sponsors
@model SponsorsListViewModel
@{
    @* ViewBag.RegistrationUrl set in code - SetSharedViewBagProperties *@
    ViewBag.Title = "";
    if ((@Model != null) && (@Model.EventDisplayName != null))
    {
        ViewBag.Title = @Html.Encode(@Model.EventDisplayName + " | Sponsors");
    }
    else
    {
        ViewBag.Title = "Code Camp | Sponsors";
    }
}

@section headaddon {
<style>
    div.in-kind-sponsors
    {
        clear:both; 
    }
    table.in-kind-sponsors
    {
        border-collapse: collapse;
        border: none;
        margin: 0;
        margin-left:10px;
        margin-right:10px;
    }
    td.in-kind-sponsor
    {
        border-collapse: collapse;
        border: none;
    }
    div.why-sponsor
    {
        margin-top: .5em;
        clear:both; 
    }
</style>
}

@if (@Model.DefaultEventShortName != @Model.EventShortName)
{
    <h4>@Html.ActionLink("Become a sponsor to " + @Model.DefaultEventDisplayName, "List", "Sponsors", new { eventName = @Model.DefaultEventShortName }, null)</h4>
    <br />
    <h3>Thanks to these sponsors and contributors who helped make @Model.EventDisplayName possible!</h3>
}
else
{
    <h3>Become a sponsor to @Model.EventDisplayName</h3>
}

<div>
    <h1 class="title">Sponsors</h1>
    <p>Thanks to the following companies for their financial support.</p>
    <div class="twoColumn">
      <div class="twoColumnLeft">
        @if (@Model.Sponsors.Count == 0)
        {
            <h3>Your Logo Here!</h3>
        }
        else
        {
            var index = 0;
            foreach (var sponsor in Model.Sponsors)
            {
                if (index++ % 2 != 0) { continue; }
                <a href="@sponsor.Url">
                <img src="@sponsor.ImageUrl"
                alt="@sponsor.Name"
                width="@sponsor.ImageWidth"
                height="@sponsor.ImageHeight"
                border="0" />
                </a><br />

            }
        }
      </div>
      <div class="twoColumnRight">
        @if (@Model.Sponsors.Count != 0)
        {
            var index = 0;
            foreach (var sponsor in Model.Sponsors)
            {
                if (index++ % 2 != 1) { continue; }
                <a href="@sponsor.Url">
                <img src="@sponsor.ImageUrl"
                alt="@sponsor.Name"
                width="@sponsor.ImageWidth"
                height="@sponsor.ImageHeight"
                border="0" />
                </a><br />
            }
        }
      </div>
    </div>
</div>
<br />
<br />
@if (!string.IsNullOrWhiteSpace(Model.PartialView1))
{
    <!-- Partial -->
    @Html.Partial(Model.PartialView1, Model)
}
<div class="why-sponsor">
    <h2>Why Sponsor?</h2>
    <p>A stronger developer community benefits the developers as well as their companies and
     all members of the developer ecosystem including 3rd party vendors. By contributing,
     a company helps support the developer ecosystem that is vital to their long term success.
     The Boston Code Camp attendance has ranged from 300-500 individuals representing many
     significant businesses in the greater Boston area.</p>

    <p>To provide this benefit, Code Camps rely on volunteers and the support of Sponsors,
     companies that provide financial or goods-in-kind support for these valuable events.
     Even though volunteers play a central role there are real expenses.  We are fortunate
     to have Microsoft provide the facilities, but we need to cover food, and beverage costs.</p>
</div>

@if (!string.IsNullOrWhiteSpace(Model.PartialView2))
{
    <!-- Partial -->
    @Html.Partial(Model.PartialView2, Model)
}
@section sidebar {
    @Html.Partial("SidebarCommonPartial")
}

